//
//  Contact.m
//  OC05_数组_字典_集合
//
//  Created by dllo on 16/3/1.
//  Copyright © 2016年 Apon. All rights reserved.
//

#import "Contact.h"

@implementation Contact

#pragma mark - 自定义初始化姓名 电话号
- (instancetype)initWithName:(NSString *)name phoneNumber:(NSString *)phoneNumber {
    self = [super init];
    if (self) {
        _name = name.uppercaseString;
        _phoneNumber = phoneNumber.uppercaseString;
    }
    return self;
}
#pragma mark - 构造器
+ (instancetype)contactWithName:(NSString *)name phoneNumber:(NSString *)phoneNumber{
    return [[Contact alloc] initWithName:name phoneNumber:phoneNumber];
}
#pragma mark - 显示联系人信息
- (NSString *)description
{
    return [NSString stringWithFormat:@"name: %@, phoneNumber: %@", self.name, self.phoneNumber];
}


@end
